<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link rel="shortcut icon" href="/cwp/favicon.ico" type="image/x-icon" />
    <title>系统管理-权限设置</title>
    <!--引入CSS文件-->
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/style.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/list.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/table.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/paging.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/btn.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/taqs.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/form.css"/>
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/bootstrap-3.3.5-dist/css/bootstrapModel.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/zTree/css/metroStyle/metroStyle.css"/>
    <!--表单验证样式--->
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/formValidator/style/validator.css"/>
    <!--树形节点样式--->
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/zTree/css/zTreeStyle/zTreeStyle.css"/>
    <style type="text/css">
        .t-layout-ra .ra-left{
            padding: 0;
            width: 180px;
            margin-right: -181px;
        }
        .t-layout-ra .ra-right .ra-rightinner{
            margin-left: 181px;
        }
        .t-list-btns{margin: 0}
        #modalEquipment .modal-body{
            padding: 0;
        }
        .buildingModal .ztree {
            border: 1px solid #617775;
            background: #fff;
            overflow-y: auto;
            overflow-x: auto;
        }
        #addChildrenList li{
            width: 40%;
        }
        #addChildrenList .addChildrenListDel{
            width: 14%;
        }
        #addChildrenList li div{
            width: 50%;;
        }
        .device-item{
            display: inline-block;
            padding: 0.5em 0;
            color: #aaa;
            text-align: left;
            font-size: 12px;
            font-weight: 600;
        }
        .device-item.cur{
            color: #515158;
        }

        .device-item:hover{
            color: #515158;

        }
        #roleList li{
            text-indent: 10px;
        }

    </style>
</head>
<body>

<!--头部文件 开始-->
<div id="header"></div>
<!--头部文件 结束-->


<div class="wrapper">
    <div id="left-menu"></div>
    <div class="right-container">
        <div class="right-scroll">
            <div class="t-list">
                <div class="t-list-title">
                    <h2>系统管理 > 权限设置</h2>
                </div>
                <div class="ra-rightinner">
                    <div class="t-list-search t-columns-4">
                        <form id="frmSearch"  onsubmit="return false">
                            <ul class="t-columns-group">
                                <li>
                                    <label>UID</label>
                                    <div><input id="queryrequestUid" type="text" value="" placeholder="请输入UID"/></div>
                                </li>
                                <!-- 时间组 -->
                                <li>
                                    <label>&nbsp;</label>
                                    <div>
                                        <a class="t-btn btnSearch">
                                            <i class="icon-search"></i>
                                            查询
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </form>
                    </div>

                    <div class="t-layout-ra clearfix">
                    <div class="ra-left" style="height: 800px">
                        <div class="t-list-btns">
                            <p>菜单</p>
                        </div>
                        <ul id="treeOrg" class="ztree fl"></ul>
                    </div>
                    <div class="ra-right">
                        <div class="ra-rightinner">

                            <div class="t-list-btns">
                                <p>权限设置</p>
                                <div>
                                    <a class="t-btn t-btn-blue" id="btnAddAuthority">新增</a>
                                </div>
                            </div>

                            <div class="t-list-result" id="authorityListBody" >
                                <table class="t-table">
                                    <thead>
                                        <tr>
                                            <td>#</td>
                                            <td>权限名称</td>
                                            <td>父级ID</td>
                                            <td>父级名称</td>
                                            <td>uid</td>
                                            <td>请求服务</td>
                                            <td>请求方法</td>
                                            <td>操作</td>
                                        </tr>
                                    </thead>
                                    <tbody id="authorityList">
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>



            </div>
        </div>
    </div>
</div>
</div>
<!--版权-->
<div id="copyright"> </div>

<!--新增模态框-->
<!--新增页面-->
<div class="modal fade bs-example-modal-lg" id="addAuthority" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">新增权限</h4>
            </div>
            <form id="frmMain">
                <div class="modal-body">
                    <div class="t-list">
                        <div class="person-setting">
                            <div class="t-columns-1">
                                <ul class="t-columns-group">
                                    <li>
                                        <label class="necessary">权限名称</label>
                                        <div><input type="text" id="permissionDesc" name="permissionDesc" value="" /></div>
                                    </li>
                                    <li class="verify">
                                        <label></label>
                                        <div class="tipArea"><div id="permissionDescTip"></div></div>
                                    </li>
                                    <li>
                                        <label class="necessary">父级ID</label>
                                        <div>
                                            <input type="text" id="parentIdText" placeholder="--请选择--" readonly="" value=""/>
                                            <input type="hidden" id="parentId" name="parentId" value=""/>
                                        </div>
                                    </li>
                                    <li class="verify">
                                        <label></label>
                                        <div class="tipArea"><div id="parentIdTip"></div></div>
                                    </li>
                                    <li>
                                        <label class="necessary">请求UID</label>
                                        <div><input type="text" id="requestUid" name="requestUid" value="" /></div>
                                    </li>
                                    <li class="verify">
                                        <label></label>
                                        <div class="tipArea"><div id="requestUidTip"></div></div>
                                    </li>
                                    <li>
                                        <label class="necessary">请求服务</label>
                                        <div><input type="text" id="requestService" name="requestService" value=""/></div>
                                    </li>
                                    <li class="verify">
                                        <label></label>
                                        <div class="tipArea"><div id="requestServiceTip"></div></div>
                                    </li>
                                    <li>
                                        <label class="necessary">请求方法</label>
                                        <div><input type="text" id="requestMethod" name="requestMethod" value=""/></div>
                                    </li>
                                    <li class="verify">
                                        <label></label>
                                        <div class="tipArea"><div id="requestMethodTip"></div></div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="btn_saveAuthority">保存</button>
                </div>
            </form>
        </div>
    </div>
</div>


<!--删除模态框-->
<div class="modal fade bs-example-modal-sm" id="delAuthority" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">是否删除权限?</h4>
            </div>
            <div class="modal-body">
                <div class="t-list">
                    <div id="delDeptName" class="title" style="font-weight: bold;">
                    </div>
                    <div class="content mt-10" style="line-height: 24px">
                        删除权限后无法恢复。是否确定删除？
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="delBack">取消</button>
                <button type="button" class="btn btn-primary"  id="btnDeleteAuthority">确定</button>
            </div>
        </div>
    </div>
</div>

<!--提示模态框-->
<div class="modal fade bs-example-modal-sm" id="myTip" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-body" style="text-align:center;font-size:14px;">
                <i id="icon-tip" style="margin-right:6px;"></i>
                <span class="tip-info"></span>
            </div>
        </div>
    </div>
</div>
    <!--菜单树模态框-->
    <div id="buildingModal" class="buildingModal" style="display:none; position: absolute;z-index: 9999;border: 1px solid #617775;top:343px">
        <ul id="treeOrgModal" class="ztree" style="margin-top:0; height: 200px;"></ul>
    </div>
<!--jQuery库脚本-->
<!--非IE8浏览器-->
<!--[if !(IE 8)]><!--><script type="text/javascript" src="../../../assets/lib/jquery/jquery.min.js"></script><!--<![endif]-->
<!--IE8浏览器-->
<!--[if IE 8]><script type="text/javascript" src="../../../assets/lib/jquery/jquery-ie8.min.js"></script><![endif]-->
<script type="text/javascript" src="../../../assets/lib/jQuery-slimScroll-1.3.8/jquery.slimscroll.min.js"></script>
<script charset="utf-8" src="../../../assets/common/loadHeaderAndCopyright.js"></script>
<!--树形节点-->
<script charset="utf-8" src="../../../assets/lib/zTree/js/jquery.ztree.core.js"></script>
<script charset="utf-8" src="../../../assets/lib/zTree/js/jquery.ztree.excheck.js"></script>
<script charset="utf-8" src="../../../assets/lib/zTree/js/jquery.ztree.exedit.js"></script>
<!--表单验证-->
<script src="../../../assets/lib/formValidator/formValidator.js"></script>
<script src="../../../assets/lib/formValidator/formValidatorRegex.js"></script>
<!--模态框-->
<script charset="utf-8" src="../../../assets/lib/bootstrap-3.3.5-dist/js/bootstrap.js"></script>
<script charset="utf-8" src="../../../assets/common/centerModal.js"></script>
<script charset="utf-8" src="../../../assets/lib/tipModal/js/tipModal.js"></script>
<!--分页脚本-->
<script charset="utf-8" src="../../../assets/lib/pagination/1.2.1/jquery.pagination.js"></script>
<script charset="utf-8" src="../../../assets/lib/artTemplate/template.js"></script>
<script charset="utf-8" src="../../../assets/common/loaderTableTmpl.js"></script>
<script charset="utf-8" src="../../../assets/common/ajaxPoster.js"></script>

<script charset="utf-8" src="../../../js/systemManagement/authority/authoritySet.js"></script>
<!--获取菜单-->
<script type="text/html" id="roleListTmpl">
    {{each beans}}
         <li><a class="device-item roleDetail" data-id="{{$value.roleId}}">{{$value.describeRole}}</a></li>
    {{/each}}
</script>
<!--加载权限列表-->
<script type="text/html" id="authorityTmpl">
    {{each beans}}
     <tr><td>{{$index+1}}</td><td>{{$value.permissionDesc}}</td><td>{{$value.parentId}}</td><td>{{$value.description}}</td></td><td>{{$value.requestUid}}</td><td>{{$value.requestService}}</td><td>{{$value.requestMethod}}</td><td><a class="t-btn t-btn-blue editAuthority" data-id="{{$index}}" data-dataId="{{$value.permissionId}}">修改</a><a class="t-btn t-btn-red delAuthority" data-id="{{$value.permissionId}}">删除</a></td></tr>
    {{/each}}
</script>

</body>
</html>